import { downLoadXlsx } from "@/utils/downloadfile";
import request from "@/utils/request";

// /serverDeploy/queryAll 服务器列表
export const serverLists = (params) => {
  const queryString = new URLSearchParams(params).toString();
  return request({
    url: "/serverDeploy/queryAll?" + queryString,
    method: "get",
    data: params,
  });
};

// /serverDeploy/add  create server
export async function addServer(data) {
  return request(`/serverDeploy/add`, {
    data: data,
    method: "POST",
  });
}

// /serverDeploy/edit editServer
export async function editServer(data) {
  return request(`/serverDeploy/edit`, {
    data: data,
    method: "PUT",
  });
}

// /serverDeploy/testConnect 测试连接
export async function testConnect(data) {
  return request(`/serverDeploy/testConnect`, {
    data: data,
    method: "POST",
  });
}
